<?php
/* 
* @Title:  [后台用户管理模型]
* @Author: {chenlei} [chenleib5@126.com]
* @Date:   2014-04-03 15:50:50
* @Last Modified by:   Administrator
* @Last Modified time: 2014-04-22 12:25:09
* @Copyright:  [hn7m.com]
*/
class AdminModel extends Model{
	public $table="admin"; //定义表名

	public $validate=array(  //定义验证规则
		array('qname','nonull','用户名不能为空',2,3),
		array('qpassword','nonull','密码不能为空',2,3)
		);

	/**
	 * [check_user 检测用户]
	 * @param  [type] $qname [description]
	 * @return [type]           [description]
	 */
	public function check_admin($qname){
		return $this->where(array('qname'=>$qname))->getField('qid');
	}
}
?>